package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotation.Autofill;
import com.sky.dto.DishPageQueryDTO;
import com.sky.entity.Dish;
import com.sky.enumeration.OperationType;
import com.sky.vo.DishVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface DishMapper {
    @Autofill(value = OperationType.INSERT)
    void insert(Dish dish);

    Page<DishVO> page(DishPageQueryDTO dishPageQueryDTO);

    void deleteAll(List<Long> ids);
@Autofill(value = OperationType.UPDATE)
    void upDate(Dish dish);

    Dish findID(Long id);

    List<Dish> findCategoryId(Long categoryId);

    void status(Integer status, Long id);


    Integer findIdStatus(List<Long> ids);
    Integer countByMap(Map map);

}
